	.file	"1_8.c"
	.globl	bufsize
	.data
	.align 4
	.type	bufsize, @object
	.size	bufsize, 4
bufsize:
	.long	500
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	leal	4(%esp), %ecx
	.cfi_def_cfa 1, 0
	andl	$-16, %esp
	pushl	-4(%ecx)
	pushl	%ebp
	.cfi_escape 0x10,0x5,0x2,0x75,0
	movl	%esp, %ebp
	pushl	%edi
	pushl	%esi
	pushl	%ebx
	pushl	%ecx
	.cfi_escape 0xf,0x3,0x75,0x70,0x6
	.cfi_escape 0x10,0x7,0x2,0x75,0x7c
	.cfi_escape 0x10,0x6,0x2,0x75,0x78
	.cfi_escape 0x10,0x3,0x2,0x75,0x74
	subl	$56, %esp
	movl	%ecx, %ebx
	movl	%esp, %eax
	movl	%eax, %esi
	movl	$0, -48(%ebp)
	movl	4(%ebx), %eax
	addl	$4, %eax
	movl	(%eax), %eax
	movl	$0, 8(%esp)
	movl	$0, 4(%esp)
	movl	%eax, (%esp)
	call	open
	movl	%eax, -44(%ebp)
	movl	4(%ebx), %eax
	addl	$8, %eax
	movl	(%eax), %eax
	movl	$0, 8(%esp)
	movl	$1, 4(%esp)
	movl	%eax, (%esp)
	call	open
	movl	%eax, -40(%ebp)
	movl	bufsize, %eax
	leal	-1(%eax), %edx
	movl	%edx, -36(%ebp)
	movl	$16, %edx
	subl	$1, %edx
	addl	%edx, %eax
	movl	$16, %edi
	movl	$0, %edx
	divl	%edi
	imull	$16, %eax, %eax
	subl	%eax, %esp
	leal	12(%esp), %eax
	addl	$0, %eax
	movl	%eax, -32(%ebp)
	jmp	.L2
.L4:
	movl	bufsize, %edx
	movl	-32(%ebp), %eax
	movl	%edx, 8(%esp)
	movl	%eax, 4(%esp)
	movl	-44(%ebp), %eax
	movl	%eax, (%esp)
	call	read
	movl	%eax, -28(%ebp)
	movl	$0, -28(%ebp)
	cmpl	$0, -28(%ebp)
	je	.L3
	movl	$1, -48(%ebp)
	jmp	.L2
.L3:
	movl	$-1, -28(%ebp)
.L2:
	cmpl	$1, -48(%ebp)
	jne	.L4
	movl	$0, %eax
	movl	%esi, %esp
	leal	-16(%ebp), %esp
	popl	%ecx
	.cfi_restore 1
	.cfi_def_cfa 1, 0
	popl	%ebx
	.cfi_restore 3
	popl	%esi
	.cfi_restore 6
	popl	%edi
	.cfi_restore 7
	popl	%ebp
	.cfi_restore 5
	leal	-4(%ecx), %esp
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4"
	.section	.note.GNU-stack,"",@progbits
